Accusoft.NotateXpress13.ActiveX
Retrieve Annotations from XFDF

Annotations in an XFDF file or variant are loaded using the same methods as those used for loading NotateXpress™ annotation data from file or variant:

Retrieve Annotations from XFDF File

Use the RetrieveAnnotation method to load annotations from file. The AnnotationType property must be set to NX_AnnotationType_XFDF. If the xfdf is a multi-page file, set the PageNumber property to specify from which page annotations should be loaded. Attempting to load a page that does not exist will cause a PageNotFound error. 

VB Example
Copy Code
' Load annotations from an XFDF file
NotateXpress1.AnnotationType = NX_XFDF_Compatible
NotateXpress1.RetrieveAnnotation "c:\annotations.xfdf" 

Retrieve Annotations from XFDF via Variant

NotateXpress provides methods for retrieving the current state of annotations via Variant variables. First set the AnnotationType property is set to NX_AnnotationType_XFDF.  Second set the PageNumber property to specify from which page annotations should be loaded. Finally use the SetAnnFromVariant method to restore annotations that are stored in a variant. To load an individual annotation layer from a variant, call the SetLayerFromVariant method.   

Translation of XFDF Supported Annotations to NotateXpress Annotations

Many of the annotations that can be expressed in an XFDF file have a direct corresponding annotation within NotateXpress. These annotations are imported without modification: 

XFDF Annotation NotateXpress Annotation
Circle Ellipse
Square Rectangle
Polygon Polygon
Line Line
Ink Freehand
Highlight BlockHighlight
FreeText Text
Text Note

The following XFDF supported annotations do not have a direct equivalent within NotateXpress. These are translated to NotateXpress as follows: 

XFDF Annotation NotateXpress Annotation Translation / Modification
Stamp

Stamp

Image

The XFDF stamps that are available by default in Acrobat are converted to NotateXpress Stamp annotations that contain the annotation text. The stamp data is stored by NotateXpress so that if these stamps are written back to XFDF, no stamp data is lost.

Uncompressed bitmap XFDF stamps (including all stamps originally written from NotateXpress to XFDF) are converted to NotateXpress images and are displayed by NotateXpress.

All other XFDF stamps are converted to NotateXpress stamps with the text "?".  The stamp data is stored by NotateXpress so that if these stamps are written back to XFDF, no stamp data is lost.

Underline

Strikeout

Squiggly

Caret

Line Squiggly annotation lines are displayed as dotted lines, and caret annotation lines are displayed as arrows. The type of the line is stored by NotateXpress so that if the annotation is written back to XFDF it is written with the same type. For example, if an underline annotation is loaded and then saved to an XFDF file, it will be saved as an XFDF underline annotation.
Popup Note An XFDF pop-up annotation is loaded as a NotateXpress Note annotation grouped with the annotation that contains the pop-up.

Translation of XFDF Annotation Position to NotateXpress

NotateXpress will automatically map PDF coordinates to NotateXpress coordinates.  Should you need to override these values, use the MappingInput event to access the original XFDF X and Y values and the new NotateXpress mapped X and Y values for an annotation. You can set the new mapped values to modify the position of the loaded annotation. 

Translation of XFDF Supported Annotation Attributes to NotateXpress

The following XFDF supported annotation attributes do not have a direct equivalent within NotateXpress. These attributes are translated to NotateXpress as follows: 

XFDF Annotation

Attribute

NotateXpress Annotation

Attribute

Translation / Modification
Title

ToolTipText

 

Name

ItemName

Flags

Visible

Locked

If the XFDF flag is set to "noview" or "hidden", the NotateXpress Visible annotation attribute is set to "false"

If the XFDF flag is set to "locked" or "readonly", the NotateXpress Locked annotation attribute will be set to true

Width PenWidth The XFDF width attribute is half that of the NotateXpress PenWidth. Therefore, an XFDF width of 3.5 will be loaded into NotateXpress as a PenWidth of 7.     
Opacity Opacity An XFDF annotation with an opacity greater than 0.9 will be converted to NotateXpress as opaque. An XFDF annotation with an opacity less than 0.1 will be converted as transparent. An XFDF annotation with an opacity between 0.1 and 0.9 will be converted as translucent.

Annotations Not Supported by NotateXpress

All other XFDF annotation types will be dropped by NotateXpress. A Dropped event will be fired to enable the application to access and store the data associated with unsupported annotations.

 

 


©2016. Accusoft Corporation. All Rights Reserved.

Send Feedback